package com.cnd.scm.code.generator.component;


import com.cnd.scm.jdbcprocessor.helper.SqlHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @version V1.0
 * @ClassName: InitDB
 * @Description:TODO()
 * @author: 李启联
 * @date: 2019-08-06 16:55
 * @Copyright: Copyright (c), 2018-2019
 * 申明：本内容未经作者本人同意,禁止外泄以及用于其他的商业项目.
 */
@Component
public class InitDB {

    @Autowired
    private SqlHelper sqlHelper;

    public void inItProc(){
        try {
            //if(!SqlHelper.isExitProcedure("Search")){
            //    SqlHelper.excuteNonQuery(CommandType.LoadResourceFile,"Search(MySql)");
            //}
            //sqlHelper.execSqlFile("classpath:/sqlscript/Search(MySql).sql");
        } catch (Exception e) {
            throw new RuntimeException("初始化数据库存储过程错误",e);
        }
    }
}